<?php include 'header.php';?>
<!--end header -->
<?php include "koneksi.php";?>


<!-- main -->
<div id="main">
<?php include 'sidebar.php';?>
    <div id="text">
	<div class="title">
        <h1><?php echo 'Gallery'?></h1>
		</div>
		<?php
		$sql = mysql_query("SELECT * FROM tb_materi");
			echo '<br />';
			echo '<table border="0" cellpadding="0" cellspacing="0">';
				echo '<tr class="zebra">';
					echo '<th>No</th>';
					echo '<th width="100">Judul</th>';
					echo '<th width="200">Menu</th>';
					echo '<th width="100">File</th>';
					echo '<th>Aksi</th>';
				echo '</tr>';
				
				$i = 1;
				while ($row = mysql_fetch_array($sql))
				{
					if ($i %2 == 0){
					echo '<tr class="zebra">';
					}
					else{
					echo '<tr class="zebra2">';
					}
						echo '<td>'.$i.'</td>';
						echo '<td>'.$row["judul"].'</td>';
						echo '<td>'.$row["menu"].'</td>';
						echo '<td>'.$row["path"].'</td>';
						echo '<td><a href="act_download.php?id='.$row["id_materi"].'">Download</a></td>';
						
					echo '</tr>';
				$i++;
				}
			echo'</table>';
		?>
	</div>
</div>
<!-- end main -->

<!-- footer -->
<?php include 'footer.php';?>
